package light.head.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.Formula;
@Entity
@Table
public class ReimburseItem implements Serializable {
	/**
	 * 报销详情
	 */
	private static final long serialVersionUID = -6372320343122362117L;
	
	private Integer code;			// 编号
	private Integer rbc;			// 报销编号
	private String project;			// 项目
	private Integer rcc;			// 类别编号
	private Double amount;			// 金额
	private Integer num;			// 票据张数
	private String remark;			// 费用明细
	private Integer oc;
	
	private String rcn;			// 类别名称
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column
	public Integer getCode() {
		return code;
	}
	@Column
	public Integer getRbc() {
		return rbc;
	}
	@Column
	public String getProject() {
		return project;
	}
	@Column
	public Double getAmount() {
		return amount;
	}
	@Column
	public Integer getNum() {
		return num;
	}
	@Column
	public String getRemark() {
		return remark;	
	}
	@Column
	public Integer getRcc() {
		return rcc;
	}
	@Formula("(SELECT re.oc FROM Reimburse re WHERE re.code = rbc)")
	public Integer getOc() {
		return oc;
	}
	@Formula("(SELECT rc.name FROM ReimburseCategory rc WHERE rc.code = rcc)")
	public String getRcn() {
		return rcn;
	}
	
	
	public void setRcc(Integer rcc) {
		this.rcc = rcc;
	}
	public void setRcn(String rcn) {
		this.rcn = rcn;
	}
	public void setOc(Integer oc) {
		this.oc = oc;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	public void setCode(Integer code) {
		this.code = code;
	}
	public void setRbc(Integer rbc) {
		this.rbc = rbc;
	}
	public void setProject(String project) {
		this.project = project;
	}
	public void setAmount(Double amount) {
		this.amount = amount;
	}
	public void setNum(Integer num) {
		this.num = num;
	}
	
	
	

}
